//
//  CustomCalloutView.m
//  flutter_plugin_gdmap
//
//  Created by Xiaoka on 2021/9/16.
//

#import "CustomCalloutView.h"
#import "CommonUtility.h"

@interface CustomCalloutView ()

@property (nonatomic, strong) UILabel *sortLabel;
@property (nonatomic, strong) UIImageView *imgView;

@end

@implementation CustomCalloutView

- (void)drawRect:(CGRect)rect
{
    
}

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self)
    {
        [self initSubViews];
    }
    return self;
}

- (void)initSubViews
{
    // 添加图片
    self.imgView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 36, 40)];
    self.imgView.image=[UIImage imageNamed:@"imgSort"];
    [self addSubview:self.imgView];
    
    // 添加排序文本
    self.sortLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 36, 40)];
    self.sortLabel.textAlignment = NSTextAlignmentCenter;
    self.sortLabel.font = [UIFont boldSystemFontOfSize:14];
    self.sortLabel.textColor = [UIColor whiteColor];
    [self addSubview:self.sortLabel];
}

- (void)setNumSort:(NSString *)numSort
{
    self.sortLabel.text = numSort;
}

@end
